//
//  Header.h
//  quxiangtao
//
//  Created by xbmios on 2018/6/22.
//  Copyright © 2018年 shanhaijin. All rights reserved.
//

#ifndef Header_h
#define Header_h

#ifdef DEBUG //开发阶段

#define NSLog(format,...) printf("%s",[[NSString stringWithFormat:(format), ##__VA_ARGS__] UTF8String])



#else //发布阶段

#define NSLog(...)

#endif

// 测试服
//#define ebaseURL @"http://quxiang.zyhyjr.com/qxt.php/"

// 正式服
//#define ebaseURL @"http://shop.quxiangtao.com/qxt.php/"
/*最新*/
//#define ebaseURL @"http://aitaoshop.haoyunkaikai.com/qxt.php/"
/*原来*/
#define ebaseURL @"http://aitaobang.haoyunkaikai.com/qxt.php/"
//http://app.xiyuchou.com/atb/

/*原来*/
#define ebaseH5 @"http://aitaobang.haoyunkaikai.com/H5/"

/*最新*/
//#define ebaseH5 @"http://aitaoshop.haoyunkaikai.com/H5/"

#define Tip @"网络连接错误，请稍后重试"

// 关于设备
//判断是否是ipad
#define isPad ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
//判断iPhone4系列
#define kiPhone4 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iPhone5系列
#define kiPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iPhone6系列
#define kiPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iphone6+系列
#define kiPhone6Plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iPhoneX
#define IS_IPHONE_X ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iPHoneXr
#define IS_IPHONE_Xr ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1624), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)

//
//#define IsiPhoneXr ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1624), [[UIScreen mainScreen] currentMode].size) : NO)


//判断iPhoneXs
#define IS_IPHONE_Xs ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iPhoneXs Max
#define IS_IPHONE_Xs_Max ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)


//iPhoneX系列
#define Height_StatusBar ((IS_IPHONE_X==YES || IS_IPHONE_Xr ==YES || IS_IPHONE_Xs== YES || IS_IPHONE_Xs_Max== YES) ? 44.0 : 20.0)
#define Height_NavBar ((IS_IPHONE_X==YES || IS_IPHONE_Xr ==YES || IS_IPHONE_Xs== YES || IS_IPHONE_Xs_Max== YES) ? 88.0 : 64.0)
#define Height_TabBar ((IS_IPHONE_X==YES || IS_IPHONE_Xr ==YES || IS_IPHONE_Xs== YES || IS_IPHONE_Xs_Max== YES) ? 83.0 : 49.0)


#define WIDTH [UIScreen mainScreen].bounds.size.width
#define HEIGHT [UIScreen mainScreen].bounds.size.height
#define STATUS_BAR_HEIGHT [UIApplication sharedApplication].statusBarFrame.size.height




#define Scale_W(W) (W*([UIScreen mainScreen].bounds.size.width/375))
#define font(n) WIDTH * (n) / 750
#define jisuan(n) WIDTH * (n) / 750
//#define jisuan(n) WIDTH * (n) / (WIDTH > 375 ? 818 : 750)
#define jisuanH(n) HEIGHT*(n) / 1334
// 一般间距
#define Margin WIDTH * (20) / 750
// 小间距
#define SmallMargin WIDTH * (16) / 750
// 大间距
#define BigMargin WIDTH * (40) / 750

#define Font(n) [UIFont systemFontOfSize:font(n)]

#define WS(weakSelf) __weak __typeof(&*self)weakSelf = self;

/* iOS设备 */
#define kDevice_Is_iPhone4s ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)
#define kDevice_Is_iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
#define kDevice_Is_iPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO)
#define kDevice_Is_iPhone6Plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhone6PlusBigMode ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2001), [[UIScreen mainScreen]currentMode].size) : NO)
//适配参数
#define KsuitParam (kDevice_Is_iPhone6Plus ?1.12:(kDevice_Is_iPhone6?1.0:(iPhone6PlusBigMode ?1.01:0.85))) //以6为基准图


// 颜色
// 主标题颜色
#define Color333333 [UIColor colorWithHexString:@"333333"]
// 此标题颜色
#define Color999999 [UIColor colorWithHexString:@"999999"]
// 主色（亮）
#define Colorff0000 [UIColor colorWithHexString:@"ff0000"]
// 主色（淡）
#define Color1f89ff [UIColor colorWithHexString:@"1f89ff"]
// 线条（1px）
#define Colordddddd [UIColor colorWithHexString:@"dddddd"]
// 背景
#define Colorf2f2f2 [UIColor colorWithHexString:@"f2f2f2"]
// 底栏
#define Colorf7f7f7 [UIColor colorWithHexString:@"f7f7f7"]

#define Colorff2952 [UIColor colorWithHexString:@"ff2952"]
#define Colorff4249 [UIColor colorWithHexString:@"ff4249"]
#define Colorb6b6b6 [UIColor colorWithHexString:@"b6b6b6"]
#define Colorfff000 [UIColor colorWithHexString:@"fff000"]
#define Colorf8e3ac [UIColor colorWithHexString:@"f8e3ac"]
#define Color252525 [UIColor colorWithHexString:@"252525"]
#define Colorf8e3ac [UIColor colorWithHexString:@"f8e3ac"]
#define Colorff4200 [UIColor colorWithHexString:@"ff4200"]
#define Color9b9b9b [UIColor colorWithHexString:@"9b9b9b"]
#define Color6ac20b [UIColor colorWithHexString:@"6ac20b"]
#define ColorE5E5E5 [UIColor colorWithHexString:@"E5E5E5"]
#define Colorcccccc [UIColor colorWithHexString:@"cccccc"]
#define Color000000 [UIColor colorWithHexString:@"000000"]
#define Colorffeeee [UIColor colorWithHexString:@"ffeeee"]
#define Colorefefef [UIColor colorWithHexString:@"efefef"]
#define Colorff6742 [UIColor colorWithHexString:@"ff6742"]
#define Color176ec7 [UIColor colorWithHexString:@"176ec7"]
//暗灰
#define LightGrayColor  [UIColor colorWithHexString:@"8f8f8f"]

#define MKViewBorderRadius(View, Radius, Width, Color)\
\
[View.layer setCornerRadius:(Radius)];\
[View.layer setMasksToBounds:YES];\
[View.layer setBorderWidth:(Width)];\
[View.layer setBorderColor:[Color CGColor]]

// 白色
#define WhiteColor [UIColor colorWithHexString:@"ffffff"]

// 微信 APPid
#define WxAppID @"wx68154ea4f566f64b"
// 微信 APPSecret
#define WXAppSecret @"879b23930549ec897dcd49748a0ae73e"

// 支付宝支付 APPid
#define AliPayAppid @"atb2019022763426239"


// public-Key
//#define PublicKey @"-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA56me9HWogThmFn1L+x/w9nvUhW+vGSJGEkEb3EMEKtqPOH2wi895ZlOdc5hZzLhxVSlpa916UNkwt0LV49uyzNHg8ztJj+oDnT/MVKnUfBg7cm8/U0WH6YnKclgTxHNor70VAOy9vn4XATJ0dKeuyOoVq86Zt39DVdgfcfxftF98AV1AVWb78snsJ857xUATU+O+G9w8E8p7Ao8wdo+8KhZWghdhfcBnLZht1NexWPaGKA/I2bTZjdUR3qlv+KLDvIJ4gKCBcGkeHnqPYKNJpRhj814cX3eMwkJ26xeW+Y+/gElwSE3j6Jhe7oexowBX/2Y8rcBpZi6O/AOUJnzeFwIDAQAB-----END PUBLIC KEY-----"


#define PublicKey @"-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCihdlmnIfLERf9vOiKqzq4exyc7vYuFohZBoy17h9lfmf00BAIpCRGHXfZlQ7FawIyL8Z7/o6jn4d3iNxgmoDkvWbA5usR6rNf4g0zE6DUlY70OWjNnLxr/s0L8uNcSwwHAtSTu8fI8D6QYAo4Bs7P1W8sJgOUOsW5GtoK+HiwwIDAQAB-----END PUBLIC KEY-----"

//#define PublicKey @"-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAw4B34Yv/+GRqL9dxPq31Sg7T6wZJk6CACavuiU2TO7O56IuzmWa0ahR5MZPDL2Al1hx3yJn05nbz/N9+XbqhQZhT3JJUDU80+QMHBuTcpZQDR8iTT5Y1l9c19lyXBDzfyU9BOD3r+BIZJhW3Uy0orKL+P0xu0VobbSefZIQJ7UhtGCH35BLfezihIiF7rwIU6M5/vucwazle4shARSqMMhskPzKdXuZwOi472y5IkPBXdeRSt7zA4W1XQwO2rbqMbnQnSP9LUXsKoww3TOlnywN+6eogDXMR/XZXtFgt0cHitW01EPK3RD5DxKVEP0sL2L6XcrYxF4PvvcvYUd8KdwIDAQAB-----END PUBLIC KEY-----"


#define IsEnablePersonalCenterVCMainTableViewScroll @"IsEnablePersonalCenterVCMainTableViewScroll"
#define CurrentSelectedChildViewControllerIndex @"CurrentSelectedChildViewControllerIndex"
#define PersonalCenterVCBackingStatus @"PersonalCenterVCBackingStatus"
#define SegementViewChildVCBackToTop @"segementViewChildVCBackToTop"

#endif /* Header_h */
